package nl.utwente.eemcs.graph;

import java.util.List;

/**
 * Construct for describing parallel behaviour
 * @author Evert Duipmans
 */
public class ParallelConstruct extends BranchedConstruct<ParallelStartNode, ParallelEndNode> {
	/**
	 * Initializes a parallel construct, with a name
	 * @param name Name of the construct
	 */
	public ParallelConstruct(String name) {
		super(name);
	}
	
	/**
	 * Add a branch
	 * @param branch Graph
	 */
	public void addBranch(Graph branch) {
		this.branches.add(branch);
	}
	
	/**
	 * Set multiple branches
	 * @param branches Branches of the parallel construct
	 */
	public void setBranches(List<Graph> branches) {
		this.branches = branches;
	}	
}